import type { RouteRecordRaw } from 'vue-router'
import { traverseTreeValues } from '@/utils'
import { basicRoutes, fallbackNotFoundRoute } from './basic'

/** 路由列表，由基本路由+静态路由组成 */
const routes: RouteRecordRaw[] = [...basicRoutes, fallbackNotFoundRoute]

/** 基本路由列表，这些路由不需要进入权限拦截 */
const coreRouteNames = traverseTreeValues(basicRoutes, (route) => route.name)

export { coreRouteNames, routes }
